import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import axios from "axios";
// 引入elementui
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

Vue.config.productionTip = false;
// 注册elmentui
Vue.use(ElementUI);

Vue.filter("formatCount", function (value) {
  if (value >= 10000 && value <= 100000000) {
    value /= 10000;
    return value.toFixed(1) + "万";
  } else if (value > 100000000) {
    value /= 100000000;
    return value.toFixed(1) + "亿";
  } else {
    return value;
  }
});
new Vue({
  router,
  store,
  axios,
  render: (h) => h(App),
}).$mount("#app");
